<template>
<el-row>
  <el-button>默认按钮</el-button>
  <el-button type="primary">主要按钮</el-button>
  <el-button type="success" @click="encrypto">成功按钮</el-button>
  <el-button type="info" @click="dncrypto">信息按钮</el-button>
  <el-button type="warning">警告按钮</el-button>
  <el-button type="danger">危险按钮</el-button>
  <span>{{a}}</span>
  <span>{{b}}</span>
</el-row>
</template>

<script>
import {SM4EnCrypto,SM4DeCrypto} from "../utils/crypto";

export default {
data(){
  return{
    a:'',
    b:''
  }

},
  methods:{
      encrypto(){
      this.a = SM4EnCrypto(JSON.stringify(a)); //账号加密
        console.log(this.a)
      },
    dncrypto(){
        this.b  = SM4DeCrypto('ggBbW+ntoXjQtayyDHlFdzkX6dotRSv5T5qP/Xq5zTAUb6E6IknJ7Vag6odx1o=='); //账
        console.log("解密")
        console.log(this.b)
      }
  }
}
</script>

<style scoped>

</style>
